#include<iostream>
#include<cmath>
using namespace std;

typedef long long ll;

int main()
{
	ll n;
	cin >> n;
	ll a = sqrt(n);
	ll x1 = a * a;
	ll x2 = (a + 1) * (a + 1);
	if ((x2 - n) > (x1 - n))
		cout << x1 << endl;
	else
		cout << x2 << endl;
	
	return 0;
}
